﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HRX.PayCenter.ApplicationCore.Specifications
{
    /// <summary>
    /// 业务常量
    /// </summary>
    public class BizConst
    {
        /// <summary>
        /// /状态
        /// </summary>
        public enum StatusEnum
        {
            /// <summary>
            /// 待支付
            /// </summary>
            WaitPay = 10,
            /// <summary>
            /// 支付成功
            /// </summary>
            Success = 20,
            /// <summary>
            /// 交易结束，不可退款
            /// </summary>
            Finished = 21,

            /// <summary>
            /// 已分账
            /// </summary>
            Divised = 30,
            /// <summary>
            /// 已分账后 交易结束
            /// </summary>
            DivisedAndFinished = 31,

            /// <summary>
            /// 已退款
            /// </summary>
            Refunded = 40,
            /// <summary>
            /// 已退款后 交易技术
            /// </summary>
            RefundedAndFinished = 41,

            /// <summary>
            /// 交易关闭 （未付款交易超时关闭，或支付完成后全额退款）
            /// 此状态下 意味着不能 分账和退款
            /// </summary>
            Closed = 100
        }

        /// <summary>
        /// 阿里支付交易状态
        /// </summary>
        public class AlipayTradeStatus
        {
            /// <summary>
            /// 等待买家支付
            /// </summary>
            public const string WaitBuyerPay = "WAIT_BUYER_PAY";
            /// <summary>
            /// 交易关闭
            /// </summary>
            public const string TradeClosed = "TRADE_CLOSED";
            /// <summary>
            /// 交易成功
            /// </summary>
            public const string TradeSuccess = "TRADE_SUCCESS";
            /// <summary>
            /// 交易完成
            /// </summary>
            public const string TradeFinished = "TRADE_FINISHED";
        }

        /// <summary>
        /// 订单号Flag
        /// </summary>
        public class OrderNoFlag
        {
            /// <summary>
            /// 交易订单 支付宝
            /// </summary>
            public const string AlipayFlag = "AP";
            /// <summary>
            /// 交易订单 微信
            /// </summary>
            public const string WechatFlag = "WX";
            /// <summary>
            /// 退款 支付宝
            /// </summary>
            public const string AlipayRefundFlag = "TKAP";
            /// <summary>
            /// 转账 支付宝
            /// </summary>
            public const string AlipayTranFlag = "ZZAP";
        }

        /// <summary>
        /// 用户类型
        /// </summary>
        public enum UserType
        {
            /// <summary>
            /// 总公司
            /// </summary>
            Header = 1,
            /// <summary>
            /// 子公司
            /// </summary>
            Sub = 2,
            /// <summary>
            /// 投资人
            /// </summary>
            Investor = 3
        }
    }
}
